package ar.com.fiuba.application.impl;

import java.util.Collection;

import ar.com.fiuba.application.api.WordDao;
import ar.com.fiuba.domain.Word;

public class WordDaoImpl extends GenericDaoImpl<Word> implements WordDao {

	@SuppressWarnings("unchecked")
	public Word findByValue(String value) {
		Collection<Word> words = getJpaTemplate().find("select W FROM ar.com.fiuba.domain.Word W where W.value like ?1",value);
		return words.iterator().next();
	}

}